<?php 

namespace app\admin\controller;
use app\admin\controller\Base;
use app\admin\model\blog;
class Page extends Base{
	public function index(){
		$list = new blog;
		$list = $list->where('type', '=', 'page')->order('time','dec')->select();
		return $this->fetch('admin/page',['artice'=>$list]);
	}
	public function pageadd(){
		return $this->fetch('admin/pageadd');
	}
	public function pageedit(){
		$id = input('id');
		$blog = new blog;
		$blog = $blog->where('id', '=', $id)->find()->toArray();
		return $this->fetch('admin/pageedit',['blog'=>$blog]);
	}
} 




 ?>